import request from '@/utils/request'

export function getList(params) {
  return request({
    url: '/yx-questions',
    method: 'get',
    params
  })
}

// export function getAnswerList(id, params) {
//   return request({
//     url: '/yx-questions/' + id + '/answer',
//     method: 'get',
//     params
//   })
// }
export function getAnswerList(id, params) {
  return request({
    url: '/v1/yx-questions/' + id + '/answer',
    method: 'get',
    params
  })
}
export function getAllQuestionList(params) {
  return request({
    url: '/v1/yx-questions',
    method: 'get',
    params
  })
}

export function answer(id, params) {
  return request({
    url: '/yx-questions/' + id + '/answer',
    method: 'post',
    data: params
  })
}
export function deleteAnswer(id) {
  return request({
    url: '/v1/answer/' + id,
    method: 'delete'
  })
}
export function deleteQuestion(id) {
  return request({
    url: '/v1/yx-questions/' + id,
    method: 'delete'
  })
}

